﻿<UserControl xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
			 xmlns:Controls="clr-namespace:ArgusControls;assembly=ArgusControls"
			 xmlns:ColoredControls="clr-namespace:ArgusControls.ThemeControls;assembly=ArgusControls"
			 xmlns:local="clr-namespace:Fractals" x:Class="Fractals.MainPage"
    mc:Ignorable="d"
    Loaded="UserControl_Loaded" KeyUp="UserControl_KeyUp_1">

	<ScrollViewer Background="Black" Margin="0" Foreground="White" BorderThickness="0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
		<Grid x:Name="LayoutRoot">
			<StackPanel x:Name="GUIStackPanel" HorizontalAlignment="Left" VerticalAlignment="Top" Background="Black">
				<Border x:Name="border" BorderBrush="White" BorderThickness="5" HorizontalAlignment="Center" Margin="10,10,10,0" VerticalAlignment="Top" CornerRadius="5" Padding="5">
					<StackPanel>
						<sdk:TabControl x:Name="tcMenu" VerticalAlignment="Top" Margin="0" Background="{x:Null}" SelectedIndex="0" Foreground="Black">
							<sdk:TabControl.BorderBrush>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FFA3AEB9" Offset="0"/>
									<GradientStop Color="#FF8399A9" Offset="0.375"/>
									<GradientStop Color="#FF718597" Offset="0.375"/>
									<GradientStop Color="White" Offset="1"/>
								</LinearGradientBrush>
							</sdk:TabControl.BorderBrush>
							<ColoredControls:ThemeTabItem x:Name="tiMenuFile" Header="{Binding Resource.MenuFile, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Background="Black" Foreground="Black">
								<StackPanel Orientation="Horizontal">
									<ColoredControls:ThemeLabeledImageButton IsEnabled="True" x:Name="bSave" VerticalAlignment="Top" HorizontalAlignment="Left" ImageStretch="None" ImageSource="/Resources/IconsBig/MenuFileSave.png" Text="{Binding Resource.MenuFileSave, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Click="bSave_Click"/>
									<ColoredControls:ThemeLabeledImageButton IsEnabled="True" x:Name="bOpen" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="2,0,0,0" ImageStretch="None" ImageSource="/Resources/IconsBig/MenuFileOpen.png" Text="{Binding Resource.MenuFileOpen, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Click="bOpen_Click"/>
									<ColoredControls:ThemeLabeledImageButton IsEnabled="True" x:Name="bExport" Margin="2,0,0,0" HorizontalAlignment="Left" Text="{Binding Resource.MenuFileExport, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Click="bExport_Click" ImageSource="/Resources/IconsBig/MenuFileExport.png"/>
									<ColoredControls:ThemeLabeledImageButton IsEnabled="True" x:Name="bAddFavorite" Margin="2,0,0,0" HorizontalAlignment="Left" Click="bAddFavorite_Click" Text="{Binding Resource.MenuFileAddFavorite, Mode=OneWay, Source={StaticResource LocalizedStrings}}" ImageSource="/Resources/IconsBig/MenuFileAddFavorite.png"/>
									<ColoredControls:ThemeLabeledImageButton IsEnabled="True" x:Name="bLoadFavorite" Margin="2,0,0,0" HorizontalAlignment="Left" Click="bLoadFavorite_Click" Text="{Binding Resource.MenuFileLoadFavorite, Mode=OneWay, Source={StaticResource LocalizedStrings}}" ImageSource="/Resources/IconsBig/MenuFileLoadFavorite.png"/>
								</StackPanel>
							</ColoredControls:ThemeTabItem>
							<ColoredControls:ThemeTabItem x:Name="tiMenuEdit" Header="{Binding Resource.MenuEdit, Mode=OneWay, Source={StaticResource LocalizedStrings}}">
								<StackPanel Orientation="Horizontal" >
									<ColoredControls:ThemeLabeledImageButton x:Name="bMenuEditLoadStartimage" Text="{Binding Resource.MenuEditLoadStartimage, Mode=OneWay, Source={StaticResource LocalizedStrings}}" ImageSource="Resources/IconsBig/MenuEditLoadStartimage.png" Click="bMenuEditLoadStartimage_Click"/>
									<ColoredControls:ThemeLabeledImageButton x:Name="bMenuEditBack" Margin="2,0,0,0" IsEnabled="False" Text="{Binding Resource.MenuEditBack, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Click="bMenuEditBack_Click" ImageSource="/Resources/IconsBig/MenuEditBack.png" />
									<ColoredControls:ThemeLabeledImageButton x:Name="bMenuEditClearHistory" Margin="2,0,0,0" IsEnabled="False" Text="{Binding Resource.MenuEditClearHistory, Mode=OneWay, Source={StaticResource LocalizedStrings}}" ImageSource="/Resources/IconsBig/MenuEditClearHistory.png" Click="bMenuEditClearHistory_Click" />
								</StackPanel>
							</ColoredControls:ThemeTabItem>
							<ColoredControls:ThemeTabItem x:Name="tiMenuZoom" Header="{Binding Resource.MenuZoom, Mode=OneWay, Source={StaticResource LocalizedStrings}}">
								<StackPanel Orientation="Horizontal" Margin="5,0,0,0">
									<CheckBox x:Name="cbKeepRatio" Content="{Binding Resource.MenuZoomKeepRatio, Mode=OneWay, Source={StaticResource LocalizedStrings}}" IsChecked="True" Foreground="White" VerticalAlignment="Center" Checked="cbKeepRatio_Checked" Unchecked="cbKeepRatio_Unchecked"/>
									<TextBlock Foreground="White" Margin="10,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{Binding Resource.MenuZoomMode, Mode=OneWay, Source={StaticResource LocalizedStrings}}" />
									<Controls:EnumComboBox x:Name="cbZoomMode" Margin="5,0,0,0" SelectionChanged="cbZoomMode_SelectionChanged"/>
								</StackPanel>
							</ColoredControls:ThemeTabItem>
							<ColoredControls:ThemeTabItem x:Name="tiMenuFractals" Header="{Binding Resource.MenuFractals, Mode=OneWay, Source={StaticResource LocalizedStrings}}">
								<StackPanel Orientation="Horizontal">
									<ColoredControls:ThemeLabeledImageButton x:Name="bSelectColoring" Text="{Binding Resource.MenuFractalsChangeColoring, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Click="bSelectColoring_Click" ImageStretch="Uniform" />
								</StackPanel>
							</ColoredControls:ThemeTabItem>
							<ColoredControls:ThemeTabItem x:Name="tiMenuHelp" Header="{Binding Resource.MenuHelp, Mode=OneWay, Source={StaticResource LocalizedStrings}}">
								<StackPanel Orientation="Horizontal">
									<ColoredControls:ThemeButton x:Name="bMenuHelpKeyShortCuts" Content="{Binding Resource.MenuHelpKeystrokeCombinations, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Click="bMenuHelpKeyShortCuts_Click"/>
								</StackPanel>
							</ColoredControls:ThemeTabItem>
						</sdk:TabControl>
						<StackPanel Orientation="Horizontal">
							<StackPanel>
								<Border x:Name="borderControlFractalParameter" BorderBrush="White" BorderThickness="1" Margin="0,5,0,0"/>
								<ColoredControls:ThemeButton x:Name="bCalculate" Content="{Binding Resource.buttonCalculate, Mode=OneWay, Source={StaticResource LocalizedStrings}}" Click="bCalculate_Click" Margin="0,5,0,0" HorizontalAlignment="Center" HorizontalContentAlignment="Right"/>
							</StackPanel>
							<StackPanel>
								<StackPanel Margin="5,5,0,0">
									<TextBlock x:Name="textMouseCoords" HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" Text="{Binding Resource.textMouseCoordinates, Mode=OneWay, Source={StaticResource LocalizedStrings}}" VerticalAlignment="Top" Foreground="White"/>
									<TextBlock x:Name="textMouseCoordsValue" HorizontalAlignment="Left" Margin="0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="White" Text="{Binding Resource.textMouseCoordinatesValue, Mode=OneWay, Source={StaticResource LocalizedStrings}}"/>
								</StackPanel>
								<Border Margin="5,0,0,0" BorderBrush="White" BorderThickness="1">
									<local:FractalImage x:Name="fractalImage" HorizontalAlignment="Center" Height="300" VerticalAlignment="Top" Width="450" MouseMove="fractalImage_MouseMove" MouseLeave="fractalImage_MouseLeave" ToolTipService.ToolTip="{Binding Resource.ToolTipFractalImage, Mode=OneWay, Source={StaticResource LocalizedStrings}}" ToolTipService.Placement="Top"/>
								</Border>
								<!--<Border x:Name="borderPreviewImage" BorderThickness="1" BorderBrush="White" HorizontalAlignment="Center" VerticalAlignment="Center">
									<Canvas x:Name="previewImageCanvas" Background="White" Width="450" Height="300">
										<Image x:Name="previewImageBackground" Width="{Binding Width, ElementName=previewImageCanvas}" Height="{Binding Height, ElementName=previewImageCanvas}"/>
										<Image x:Name="previewImage" Width="{Binding Width, ElementName=previewImageCanvas}" Height="{Binding Height, ElementName=previewImageCanvas}"/>
									</Canvas>
								</Border>-->
							</StackPanel>
							<Border Margin="5,5,5,0" x:Name="borderControlColoringParameter" BorderBrush="White" BorderThickness="1"/>
						</StackPanel>
					</StackPanel>
				</Border>
				<Grid HorizontalAlignment="Center" Width="{Binding ActualWidth, ElementName=border, Mode=OneWay}">
					<StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
						<HyperlinkButton Content="{Binding Resource.textFacebookPage, Mode=OneWay, Source={StaticResource LocalizedStrings}}" NavigateUri="https://www.facebook.com/KloobersBunteBilder" TargetName="_blank" Foreground="White" HorizontalAlignment="Left"/>
						<HyperlinkButton Content="{Binding Resource.textMail, Mode=OneWay, Source={StaticResource LocalizedStrings}}" NavigateUri="mailto:info@kloober.ch.vu" TargetName="_blank" Foreground="White" HorizontalAlignment="Left"/>
					</StackPanel>
					<TextBlock HorizontalAlignment="Right" VerticalAlignment="Top" Text="{Binding Resource.textCopyRight, Mode=OneWay, Source={StaticResource LocalizedStrings}}"/>
				</Grid>
			</StackPanel>
			<local:PreviewWindow x:Name="previewWindow" Visibility="Collapsed"/>
		</Grid>
	</ScrollViewer>
</UserControl>
